#!/usr/bin/python
# -*- coding: utf-8 -*-
# Create Time :  2006-12-20 下午09:39:43

from twisted.python.otp import OTP
from twisted.python.otp import OTPAuthenticator
import cmd, sys

#===============================================================================
#h = OTPAuthenticator()
#
#_chall = {}
#
#for x in range(1,11):
#    _c = h.challenge(h.generateSeed(), x)
#    _chall[_c] = h.makeReadable(_c)
#    
#print _chall
#
#for x,y in _chall.iteritems():
#    print x,'|',y
#===============================================================================

class otp_cmd(cmd.Cmd):
    
    def do_oks(self, arg):

        print 'OKS'
        
    def do_exit(self, arg):
        
        print 'EXIT'
        sys.exit()
        
    def do_ed(self, arg):
        pass

def main():
    c = otp_cmd()
    print dir(c)
    c.cmdloop('OTP TEST')

if __name__ == '__main__':
    main()